package com.top.servlet;


import com.top.bean.User_detail_info;
import com.top.dao.userDao;
import com.top.dao.userDaoImpl;
import com.top.service.userService;
import com.top.service.userServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class DesignServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doPost(req,resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        userDao dao = new userDaoImpl();
        List<User_detail_info> users = dao.getInfo();
        req.setAttribute("users",users);
        req.getRequestDispatcher("design.jsp").forward(req,resp);
    }
}
